/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Hochschule Heilbronn
 * License Type: Academic
 */
package de.hhn.pmt.tour.u6;

public class Location extends de.hhn.pmt.tour.u6.POI {
	public Location() {
	}

	private java.util.Set this_getSet(int key) {
		if (key == de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_EVENT) {
			return ORM_event;
		} else if (key == de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_TOURS) {
			return ORM_tours;
		}

		return null;
	}

	private void this_setOwner(Object owner, int key) {
		if (key == de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_VERANSTALTER) {
			this.veranstalter = (de.hhn.pmt.tour.u6.Veranstalter) owner;
		}

		else if (key == de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_COORDINATES) {
			this.coordinates = (de.hhn.pmt.tour.u6.Coordinates) owner;
		}
	}

	org.orm.util.ORMAdapter _ormAdapter = new org.orm.util.AbstractORMAdapter() {
		public java.util.Set getSet(int key) {
			return this_getSet(key);
		}

		public void setOwner(Object owner, int key) {
			this_setOwner(owner, key);
		}

	};

	private de.hhn.pmt.tour.u6.Veranstalter veranstalter;

	private double bewertungDurchschnitt;

	private String[] kategorie;

	private String[] bewertungen;

	private String[] extras;

	private java.util.Set ORM_event = new java.util.HashSet();

	private de.hhn.pmt.tour.u6.Coordinates coordinates;

	private java.util.Set ORM_tours = new java.util.HashSet();

	public void setKategorie(String[] value) {
		this.kategorie = value;
	}

	public String[] getKategorie() {
		return kategorie;
	}

	public void setBewertungen(String[] value) {
		this.bewertungen = value;
	}

	public String[] getBewertungen() {
		return bewertungen;
	}

	public void setBewertungDurchschnitt(double value) {
		this.bewertungDurchschnitt = value;
	}

	public double getBewertungDurchschnitt() {
		return bewertungDurchschnitt;
	}

	public void setExtras(String[] value) {
		this.extras = value;
	}

	public String[] getExtras() {
		return extras;
	}

	public void setVeranstalter(de.hhn.pmt.tour.u6.Veranstalter value) {
		if (veranstalter != null) {
			veranstalter.location.remove(this);
		}
		if (value != null) {
			value.location.add(this);
		}
	}

	public de.hhn.pmt.tour.u6.Veranstalter getVeranstalter() {
		return veranstalter;
	}

	/**
	 * This method is for internal use only.
	 */
	public void setORM_Veranstalter(de.hhn.pmt.tour.u6.Veranstalter value) {
		this.veranstalter = value;
	}

	private de.hhn.pmt.tour.u6.Veranstalter getORM_Veranstalter() {
		return veranstalter;
	}

	private void setORM_Event(java.util.Set value) {
		this.ORM_event = value;
	}

	private java.util.Set getORM_Event() {
		return ORM_event;
	}

	public final de.hhn.pmt.tour.u6.EventSetCollection event = new de.hhn.pmt.tour.u6.EventSetCollection(
			this, _ormAdapter,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_EVENT,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_EVENT_LOCATION,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_MUL_ONE_TO_MANY);

	public void setCoordinates(de.hhn.pmt.tour.u6.Coordinates value) {
		if (this.coordinates != value) {
			de.hhn.pmt.tour.u6.Coordinates lcoordinates = this.coordinates;
			this.coordinates = value;
			if (value != null) {
				coordinates.setPoi(this);
			} else {
				lcoordinates.setPoi(null);
			}
		}
	}

	public de.hhn.pmt.tour.u6.Coordinates getCoordinates() {
		return coordinates;
	}

	private void setORM_Tours(java.util.Set value) {
		this.ORM_tours = value;
	}

	private java.util.Set getORM_Tours() {
		return ORM_tours;
	}

	public final de.hhn.pmt.tour.u6.TourSetCollection tours = new de.hhn.pmt.tour.u6.TourSetCollection(
			this, _ormAdapter,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_LOCATION_TOURS,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_TOUR_LOCATIONS,
			de.hhn.pmt.tour.u6.ORMConstants.KEY_MUL_MANY_TO_MANY);

	public String toString() {
		return super.toString();
	}

}
